package aom.ju.ss.utils

import android.widget.Toast


private var toast: Toast? = null

fun show(info: Any?) {
    if (info.toString() == "重复请求") {
        return
    }
    if (info.toString().isEmpty() || info.toString().length > 100 || info.toString().contains("code")) {
        return
    }
    if (toast == null) {
        toast = Toast.makeText(BaseApplication.getInstance(), null, Toast.LENGTH_SHORT)
    }
    try {
        toast!!.setText(info.toString() + "")
        toast!!.show()
    } catch (c: Exception) {
        LogUtils.e(c.message)
    }
}
